import request from "@/utils/request_oil";

// /warehouse/manage 库存管理列表
export function manage(data) {
  return request({
    url: "/warehouse/manage",
    method: "post",
    data: data,
  });
}

// /warehouse/batch/list 查看入库批次列表
export function batchlist(data) {
  return request({
    url: "/warehouse/batch/list",
    method: "post",
    data: data,
  });
}

// GET /warehouse/list 查看入库详情单
export function warehouseList(data) {
  return request({
    url: "/warehouse/list",
    method: "get",
    params: data,
  });
}

// POST /commodity/list 分页查询
export function commodityList(data) {
  return request({
    url: "/commodity/list",
    method: "post",
    data: data,
  });
}

// POST /commodity/queryByCommodityCode 根据商品编码查询商品
export function queryByCommodityCode(data) {
  return request({
    url: "/commodity/queryByCommodityCode",
    method: "post",
    data: data,
  });
}

// POST /commodity/queryByBarCode 根据商品条形码查询商品
export function queryByBarCode(data) {
  return request({
    url: "/commodity/queryByBarCode",
    method: "post",
    data: data,
  });
}

// POST /warehouse/addList 新增入库单列表
export function warehouseAddList(data) {
  return request({
    url: "/warehouse/addList",
    method: "post",
    data: data,
  });
}

// POST /warehouse/batch/export 入库管理导出
export function batchExport(data) {
  return request({
    url: "/warehouse/batch/export",
    method: "post",
    data: data,
  });
}

// POST /nonOilOrder/list 分页查询非油订单
export function nonOilOrderList(data) {
  return request({
    url: "/nonOilOrder/list",
    method: "post",
    data: data,
  });
}

// POST getNonOilCategoryTreeAndCommodity   数型数据
export function getNonOilCategoryTreeAndCommodity(data) {
  return request({
    url: "/nonOilCategory/getNonOilCategoryTreeAndCommodity",
    method: "post",
    data: data,
  });
}

// 查询油企
export function enterpriseList(query) {
  return request({
    url: "/enterprise/info/list",
    method: "get",
    params: query,
  });
}

// 新查询油站
export function listEnterpriseStation(query) {
  return request({
    url: "/station/message/listEnterpriseStation",
    method: "get",
    params: query,
  });
}

// 新查询油站列表 GET /station/message/getRepositoryAndStation
export function getRepositoryAndStation(query) {
  return request({
    url: "/station/message/getRepositoryAndStation",
    method: "get",
    params: query,
  });
}

// 获取油站信息弹框 GET /station/message/getRepository
export function getRepository(query) {
  return request({
    url: "/station/message/getRepository",
    method: "get",
    params: query,
  });
}

// POST /nonOilOrder/export 导出非油订单
export function nonOilOrderExport(query) {
  return request({
    url: "/nonOilOrder/export",
    method: "post",
    data: query,
  });
}

// GET /nonOilOrder/order/details 查询订单详情
export function orderDetails(query) {
  return request({
    url: "/nonOilOrder/order/details",
    method: "get",
    params: query,
  });
}

// GET /nonOilOrder/order/details/export 查询订单详情
export function orderDetailsExport(query) {
  return request({
    url: "/nonOilOrder/order/details/export",
    method: "get",
    params: query,
  });
}
